#ifndef __USART_H__
#define __USART_H__

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "main.h"

/* USER CODE BEGIN Includes */
#define SIMUARTDATAMAX 300
typedef struct 
{
	uint16_t RecdataCount;
	uint16_t rcvFlag;
	uint16_t DataNum;
	uint16_t tailPosition;
	uint16_t headPosition;
	uint8_t  RecData[SIMUARTDATAMAX];
} Uart_RcvTypedef;

extern Uart_RcvTypedef Uart1Buf;

/* USER CODE END Includes */

/* USER CODE BEGIN Private defines */
extern u32 UART1TimeOut;
/* USER CODE END Private defines */

void MX_USART1_UART_Init(void);

/* USER CODE BEGIN Prototypes */
void dbg_printf( const char* str, ... );
void Uart1_SendByte(uint8_t *txdBuf,uint16_t len);

/* USER CODE END Prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __USART_H__ */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
